import java.util.ArrayList;

/*
 * This is the data structure to store each row of the examples
 */
public class Data {
	private ArrayList<String> data;
	
	public Data(){
		data = new ArrayList<String>();
	}
	
	/**
	 * Add attribute to each row of data
	 * @param attribute
	 */
	public void addAttribute(String value){
		data.add(value);
	}
	
	public String getAttribute(int index){
		return data.get(index);
	}
	
	public void updateAttribute(int attribute,String value){
		data.set(attribute, value);
	}
	
	public int size(){
		return data.size();
	}
	
	/**
	 * toString
	 */
	public String toString(){
		StringBuffer stringBuffer = new StringBuffer();
		for(int i = 0;i<data.size();i++){
		stringBuffer.append(data.get(i));
		stringBuffer.append("  ");
		}
		return stringBuffer.toString();
	}
}
